08f6ba94574e741aa85acf5cca0b1b612f28c27e,server/sonar-server/src/test/java/org/sonar/server/computation/issue/IssueCounterTest.java,IssueCounterTest,count_new_issues,#,206
Before Change
// created during the first analysis starting the period -> existing issues
underTest.onIssue(FILE1, createIssueAt(null, STATUS_OPEN, BLOCKER, period.getSnapshotDate()));
// created after -> new issues
underTest.onIssue(FILE1, createIssueAt(null, STATUS_OPEN, CRITICAL, period.getSnapshotDate() + 100000L));
underTest.onIssue(FILE1, createIssueAt(RESOLUTION_FIXED, STATUS_CLOSED, MAJOR, period.getSnapshotDate() + 200000L));
underTest.afterComponent(FILE1);
After Change
// created during the first analysis starting the period -> existing issues (so ignored)
underTest.onIssue(FILE1, createIssueAt(null, STATUS_OPEN, BLOCKER, period.getSnapshotDate()).setType(IssueType.BUG));
// created after -> 3 new issues but 1 is closed
underTest.onIssue(FILE1, createIssueAt(null, STATUS_OPEN, CRITICAL, period.getSnapshotDate() + 100000L).setType(IssueType.CODE_SMELL));
underTest.onIssue(FILE1, createIssueAt(null, STATUS_OPEN, CRITICAL, period.getSnapshotDate() + 100000L).setType(IssueType.BUG));
underTest.onIssue(FILE1, createIssueAt(RESOLUTION_FIXED, STATUS_CLOSED, MAJOR, period.getSnapshotDate() + 200000L).setType(IssueType.BUG));
underTest.afterComponent(FILE1);